package com.yywq.service;

import com.yywq.error.BusinessException;
import com.yywq.pojo.User;
import com.yywq.pojo.view.UserView;

/**
 * @author: 吴磊
 * @program: yywq
 * @create: 2021-03-20 22:23
 */
public interface UserService {
    /**
     * 登录
     *
     * @param telPhone
     * @param password
     * @return
     * @throws BusinessException
     */
    User login(String telPhone, String password) throws BusinessException;

    /**
     * 注册
     *
     * @param user
     * @throws BusinessException
     */
    int register(User user) throws BusinessException;

    /**
     * 获取用户详细信息
     *
     * @param id
     * @return
     */
    UserView getUserView(String id);
}
